package com.njlime.cms.entities;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Table;

import com.njlime.core.base.entities.BaseEntityPlus;
import com.njlime.core.web.validation.RegexType;
import com.njlime.core.web.validation.annotation.Validate;

/**
 * 资讯实体类
 *
 * @since 
 */
@Entity
@Table(name = "t_information")
public class Information extends BaseEntityPlus{
	@Validate(description = "标题", nullable = false)
    private String title; // 标题
    private String abstract_info; // 摘要
	@Validate(description = "内容", nullable = false)
    private String content; // 内容
    @Validate(description = "发布位置", nullable = false,regexType= RegexType.NUMBER)
    private Integer position; // 发布位置
    @Validate(description = "标签", nullable = false,regexType= RegexType.NUMBER)
    private Integer label_id; // 标签 关联标签表
    private String source_url; // 原文链接
    @Validate(description = "发布状态", nullable = false,regexType= RegexType.NUMBER)
    private Integer publish_status; // 1 草稿（预览） 2未发布 3已发布 4已下线
	@Validate(description = "主题图1", nullable = false)
    private String theme_img1; // 主题图1
    private String theme_img2; // 主题图2
    private String theme_img3; // 主题图3
    private Date publish_time; // 发布时间  如果当前为定时发送的则为定时时间，如果当前为立刻发布则为发布时间
    private Integer reading; // 阅读量
    private Integer comment_num; // 评论数
    private Integer unit_id; // 单位ID
    private Integer root_unit_id; // 根单位ID
    private String motion;
    private Integer is_comment; // 评论审核开关
    @Validate(description = "频道", nullable = false,regexType= RegexType.NUMBER)
    private Integer channel_id; // 频道ID
    @Validate(description = "栏目", nullable = false,regexType= RegexType.NUMBER)
    private Integer column_id; // 栏目ID
    @Validate(description = "是否收费", nullable = false,regexType= RegexType.NUMBER)
    private Integer is_charge; // 是否收费 0不收 1收
    private Integer money; // 费用
    private Integer type; //类型
    private String material_ids; //图文素材
    private Integer topic_id;

    /**
     * 热点位置
     * OP = 1; 置顶
     * BANNER_1 = 2; BANNER_1
     * BANNER_2 = 3; BANNER_2
     * BANNER_3 = 4; BANNER_3
     * DEFAULT = 99; 默认
     */
    public static final class InfoPosition {
        public static final int TOP = 1; //置顶
        public static final int BANNER_1 = 2; //BANNER_1
        public static final int BANNER_2 = 3; //BANNER_2
        public static final int BANNER_3 = 4; //BANNER_3
        public static final int DEFAULT = 99; //默认
    }

    /**
     * 阅读支付类型
     */
    public static final class InfoPayType {
        public static final int SINGLE = 1; //单篇
        public static final int MONTH = 2; //包月
    }

    /**
     * 资讯类型
     */
    public static final class InfoType {
        public static final int INFO = 1; //资讯
        public static final int TOPIC = 2; //专题
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getAbstract_info() {
        return abstract_info;
    }

    public void setAbstract_info(String abstract_info) {
        this.abstract_info = abstract_info;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getPosition() {
        return position;
    }

    public void setPosition(Integer position) {
        this.position = position;
    }

    public Integer getLabel_id() {
        return label_id;
    }

    public void setLabel_id(Integer label_id) {
        this.label_id = label_id;
    }

    public String getSource_url() {
        return source_url;
    }

    public void setSource_url(String source_url) {
        this.source_url = source_url;
    }

    public Integer getPublish_status() {
        return publish_status;
    }

    public void setPublish_status(Integer publish_status) {
        this.publish_status = publish_status;
    }

    public String getTheme_img1() {
        return theme_img1;
    }

    public void setTheme_img1(String theme_img1) {
        this.theme_img1 = theme_img1;
    }

    public String getTheme_img2() {
        return theme_img2;
    }

    public void setTheme_img2(String theme_img2) {
        this.theme_img2 = theme_img2;
    }

    public String getTheme_img3() {
        return theme_img3;
    }

    public void setTheme_img3(String theme_img3) {
        this.theme_img3 = theme_img3;
    }

    public Date getPublish_time() {
        return publish_time;
    }

    public void setPublish_time(Date publish_time) {
        this.publish_time = publish_time;
    }

    public Integer getReading() {
        return reading;
    }

    public void setReading(Integer reading) {
        this.reading = reading;
    }

    public Integer getComment_num() {
        return comment_num;
    }

    public void setComment_num(Integer comment_num) {
        this.comment_num = comment_num;
    }

    public Integer getUnit_id() {
        return unit_id;
    }

    public void setUnit_id(Integer unit_id) {
        this.unit_id = unit_id;
    }

    public Integer getIs_comment() {
        return is_comment;
    }

    public void setIs_comment(Integer is_comment) {
        this.is_comment = is_comment;
    }

    public Integer getChannel_id() {
        return channel_id;
    }

    public void setChannel_id(Integer channel_id) {
        this.channel_id = channel_id;
    }

    public Integer getColumn_id() {
        return column_id;
    }

    public void setColumn_id(Integer column_id) {
        this.column_id = column_id;
    }

    public Integer getIs_charge() {
        return is_charge;
    }

    public void setIs_charge(Integer is_charge) {
        this.is_charge = is_charge;
    }

    public Integer getMoney() {
        return money;
    }

    public void setMoney(Integer money) {
        this.money = money;
    }

    public Integer getRoot_unit_id() {
        return root_unit_id;
    }

    public void setRoot_unit_id(Integer root_unit_id) {
        this.root_unit_id = root_unit_id;
    }

    public String getMotion() {
        return motion;
    }

    public void setMotion(String motion) {
        this.motion = motion;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getMaterial_ids() {
        return material_ids;
    }

    public void setMaterial_ids(String material_ids) {
        this.material_ids = material_ids;
    }

    public Integer getTopic_id() {
        return topic_id;
    }

    public void setTopic_id(Integer topic_id) {
        this.topic_id = topic_id;
    }
}